package com.bindapp;

import android.app.Application;

import com.videogo.openapi.EZOpenSDK;

import cn.jpush.android.api.CustomPushNotificationBuilder;
import cn.jpush.android.api.JPushInterface;

public class App extends Application {
    public static String AppKey = "96288c6c696343e98f3685df552d2a8b";
    public static EZOpenSDK getOpenSDK() {
        return EZOpenSDK.getInstance();
    }
    @Override
    public void onCreate() {
        super.onCreate();
        initSDK();
        JPushInterface.setDebugMode(true); 	// 设置开启日志,发布时请关闭日志
        JPushInterface.init(this);
        CustomPushNotificationBuilder builder = new
                CustomPushNotificationBuilder(getApplicationContext(),
                R.layout.customer_notitfication_layout,
                R.id.icon,
                R.id.title,
                R.id.text);
        builder.statusBarDrawable = R.drawable.applogo;
        builder.layoutIconDrawable = R.drawable.applogo;
        JPushInterface.setPushNotificationBuilder(1,builder);
    }
    private void initSDK() {
        {
            /**
             * sdk日志开关，正式发布需要去掉
             */
            EZOpenSDK.showSDKLog(true);

            /**
             * 设置是否支持P2P取流,详见api
             */
            EZOpenSDK.enableP2P(true);

            /**
             * APP_KEY请替换成自己申请的
             */
            EZOpenSDK.initLib(this, AppKey);
        }
    }
}
